# frozen_string_literal: true

require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

require "rubocop/rake_task"

RuboCop::RakeTask.new

# Load REST API generation tasks
load File.expand_path("Rakefile.rest", __dir__)

# Generate REST API client before building the gem
task :build => "api:generate"

# Generate REST API client before running tests (for CI)
task :spec => "api:generate_if_missing"

task default: %i[spec rubocop]
